Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop unnecessary check in RequirementSet.add_requirement #7706

Closed

Conversation

pradyunsg
Copy link
Member

While @pfmoore and I were walking through this code, we noticed that we'd never actually hit the case which this conditional guards against -- adding a constraint after adding requirements.

Filing as a PR, so that we can discuss concretely what we want to do here.

@pradyunsg
Copy link
Member Author

I'm kinda torn on removing this code, since there is a small risk of potential breakage due to this change affecting things that I'm not expecting it to.

@chrahunt
Copy link
Member

chrahunt commented Feb 6, 2020

That's a risk with anything, to mitigate it we usually simplify the code until it's obvious. We could do the same here. If we split RequirementSet into one case used for get_requirements (after merging #7704) and one for use in Resolver that would be easier since we only have to worry about one caller at once.

@pradyunsg
Copy link
Member Author

Makes sense to me!

@pradyunsg
Copy link
Member Author

pradyunsg commented Feb 7, 2020

/me wonders if we should just drop this, since it might make more sense to ignore this method, and work with all the other abstractions that we have; for the new resolver.

@pradyunsg pradyunsg closed this Apr 19, 2020
@pradyunsg pradyunsg deleted the drop-seemingly-unnecessary-evaluation branch April 19, 2020 18:20
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants